<template>
	<div>
		<ul class="module-attr-tab">
			<li v-for="(item, index) in tab" :class="cur === index ? 'on' : ''" @click="cur = index">{{ item.name }}</li>
		</ul>
		<!--基础设置-->
		<template v-if="cur == 0">
			<template v-if="this.attr.base.s=='0'">
				
				<div class="att-con-box">
					<div class="att-con-pd">
						<div class="item c">
							<div class="tit">显示高度：</div>
							<div class="input flex">
								<div class="input-line">
									<input type="text"  maxlength="100" v-model="attr.base.h" class="intxt" />
								</div>
							</div>
						</div>
						<div class="item c">
							<div class="tit mg">填充颜色：</div>
							<div class="input">
								<el-tooltip effect="dark" content="颜色" placement="top"><colorPicker v-model="attr.base.fc" :defaultColor="attr.base.fc" /></el-tooltip>
							</div>
						</div>
					</div>
				</div>
			</template>
		</template>
		
	</div>
</template>

<script>
import AttrText from '@/views/attr/text.vue';
export default {
	name: 'AttrTool',
	props: ['attr'],
	components: { AttrText},
	computed:{
		fhstyle() {
			console.log(this.attr)
		}
	},
	data() {
		return {
			tab: [{ name: '基础设置', content: '' }],
			cur: 0
		};
	},

	methods: {
		
		//上移
		up(arr, index) {
			arr.splice(index - 1, 0, arr[index]);
			arr.splice(index + 1, 1);
		},
		//下移
		down(arr, index) {
			arr.splice(index + 2, 0, arr[index]);
			arr.splice(index, 1);
		}
	}
};
</script>

<style></style>
